#!/bin/bash
##############################################
#
# Copyright:
# 2008 openWorks
#
# License:
# GPL: http://www.gnu.org/licenses/lgpl.html
# See the LICENSE file in the project's top-level directory for details.
#
# Authors:
# Juan Matias Granda
#
##############################################

echo "-------------------------------------------------------------------------"
echo "Generacion de iconos de framework qx.ow"
echo "-------------------------------------------------------------------------"
echo ""
echo "* Se eliminaran los directorios: 16, 22, 32, 48, 64. (CANCEL: Control+C)"
read

rm -rf 16/ 22/ 32/ 48/ 64/

echo "* Creando nuevos directorios"
mkdir {16,22,32,48,64} || return 1

echo "* Generando imagenes"
cd 128
for size in 16 22 32 48 64; do
	echo "- Creando iconos de "$size"x"$size
	for icono in *; do
		convert $icono -resize $size  ../$size/$icono
	done
done
echo ""
echo "* Creacion completada."
echo "-------------------------------------------------------------------------"
echo ""